package cn.polarismesh.agent.plugin.nacos.asm;

import cn.polarismesh.agent.plugin.nacos.exception.UnsupportedNacosClientException;
import org.objectweb.asm.*;


public class NamingClientProxyGenerator implements AsmDynamicClassGenerator {

    public byte[] generate() {

        try {
            return generate21();
        } catch (Exception e) {
            throw new UnsupportedNacosClientException(e);
        }
    }

    private byte[] generate21() {

        ClassWriter classWriter = new ClassWriter(0);
        FieldVisitor fieldVisitor;
        RecordComponentVisitor recordComponentVisitor;
        MethodVisitor methodVisitor;
        AnnotationVisitor annotationVisitor0;

        classWriter.visit(V1_8, ACC_PUBLIC | ACC_SUPER, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", null, "java/lang/Object", new String[]{"com/alibaba/nacos/client/naming/remote/NamingClientProxy"});

        classWriter.visitSource("DynamicNamingClientProxy.java", null);

        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "logger", "Lorg/slf4j/Logger;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/String;Lcom/alibaba/nacos/client/naming/cache/ServiceInfoHolder;Ljava/util/Properties;Lcom/alibaba/nacos/client/naming/event/InstancesChangeNotifier;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(31, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(27, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitLdcInsn("com.alibaba.nacos.client.naming");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "org/slf4j/LoggerFactory", "getLogger", "(Ljava/lang/String;)Lorg/slf4j/Logger;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(32, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegate");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegate", "<init>", "(Ljava/lang/String;Lcom/alibaba/nacos/client/naming/cache/ServiceInfoHolder;Ljava/util/Properties;Lcom/alibaba/nacos/client/naming/event/InstancesChangeNotifier;)V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(33, label3);
            methodVisitor.visitLdcInsn("other.nacos.server.addr");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(36, label4);
            methodVisitor.visitTypeInsn(NEW, "java/util/Properties");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/util/Properties", "<init>", "()V", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label5 = new Label();
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(37, label5);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "putAll", "(Ljava/util/Map;)V", false);
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(38, label6);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitLdcInsn("serverAddr");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "setProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;", false);
            methodVisitor.visitInsn(POP);
            Label label7 = new Label();
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(39, label7);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegate");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegate", "<init>", "(Ljava/lang/String;Lcom/alibaba/nacos/client/naming/cache/ServiceInfoHolder;Ljava/util/Properties;Lcom/alibaba/nacos/client/naming/event/InstancesChangeNotifier;)V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            Label label8 = new Label();
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(41, label8);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "cn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist", "<init>", "()V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist;");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(42, label9);
            methodVisitor.visitInsn(RETURN);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label10, 0);
            methodVisitor.visitLocalVariable("namespace", "Ljava/lang/String;", null, label0, label10, 1);
            methodVisitor.visitLocalVariable("serviceInfoHolder", "Lcom/alibaba/nacos/client/naming/cache/ServiceInfoHolder;", null, label0, label10, 2);
            methodVisitor.visitLocalVariable("properties", "Ljava/util/Properties;", null, label0, label10, 3);
            methodVisitor.visitLocalVariable("changeNotifier", "Lcom/alibaba/nacos/client/naming/event/InstancesChangeNotifier;", null, label0, label10, 4);
            methodVisitor.visitLocalVariable("otherNacosDomain", "Ljava/lang/String;", null, label4, label10, 5);
            methodVisitor.visitLocalVariable("otherProperties", "Ljava/util/Properties;", null, label5, label10, 6);
            methodVisitor.visitMaxs(7, 7);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "registerService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "com/alibaba/nacos/api/exception/NacosException");
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(47, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist", "fillMetadata", "(Ljava/lang/Object;)V", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(50, label1);
            Label label9 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label9);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(48, label2);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(49, label10);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy fillMetadata failed ");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(51, label9);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 4);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(53, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "registerService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", true);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(57, label4);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(54, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 5, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/naming/pojo/Instance", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(55, label12);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(56, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy registerService err.");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(58, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(61, label6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "registerService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", true);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(65, label7);
            Label label14 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label14);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(62, label8);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/naming/pojo/Instance", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(63, label15);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(64, label16);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy registerService err.");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(66, label14);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 4);
            Label label17 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label17);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitJumpInsn(IFNULL, label17);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(67, label18);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(69, label17);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(RETURN);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label10, label9, 4);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label11, 5);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label15, label14, 6);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label19, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label0, label19, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label19, 2);
            methodVisitor.visitLocalVariable("instance", "Lcom/alibaba/nacos/api/naming/pojo/Instance;", null, label0, label19, 3);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label19, 4);
            methodVisitor.visitLocalVariable("secondaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label6, label19, 5);
            methodVisitor.visitMaxs(4, 7);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "deregisterService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(74, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 4);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(76, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "deregisterService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", true);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(80, label1);
            Label label7 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label7);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(77, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 5, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/naming/pojo/Instance", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label8 = new Label();
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(78, label8);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(79, label9);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy deregisterService err.");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(81, label7);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(83, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "deregisterService", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", true);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(87, label4);
            Label label10 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(84, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/naming/pojo/Instance", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label11 = new Label();
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(85, label11);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(86, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy deregisterService err.");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(88, label10);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 4);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label13);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitJumpInsn(IFNULL, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(89, label14);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(91, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(RETURN);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label8, label7, 5);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label11, label10, 6);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label6, label15, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label6, label15, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label6, label15, 2);
            methodVisitor.visitLocalVariable("instance", "Lcom/alibaba/nacos/api/naming/pojo/Instance;", null, label6, label15, 3);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label0, label15, 4);
            methodVisitor.visitLocalVariable("secondaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label15, 5);
            methodVisitor.visitMaxs(4, 7);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "updateInstance", "(Ljava/lang/String;Ljava/lang/String;Lcom/alibaba/nacos/api/naming/pojo/Instance;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(96, label0);
            methodVisitor.visitInsn(RETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label1, 2);
            methodVisitor.visitLocalVariable("instance", "Lcom/alibaba/nacos/api/naming/pojo/Instance;", null, label0, label1, 3);
            methodVisitor.visitMaxs(0, 4);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "queryInstancesOfService", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/Exception");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(101, label9);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(102, label10);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(104, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ILOAD, 4);
            methodVisitor.visitVarInsn(ILOAD, 5);
            Label label11 = new Label();
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(105, label11);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "queryInstancesOfService", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", true);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(109, label1);
            Label label12 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label12);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(106, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 8, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", Opcodes.INTEGER, Opcodes.INTEGER, "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(107, label13);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(108, label14);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy queryInstancesOfService err.");
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(110, label12);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(111, label15);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(113, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ILOAD, 4);
            methodVisitor.visitVarInsn(ILOAD, 5);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(114, label16);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "queryInstancesOfService", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", true);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(118, label4);
            Label label17 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label17);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(115, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 10, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", Opcodes.INTEGER, Opcodes.INTEGER, "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(116, label18);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(117, label19);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy queryInstancesOfService err.");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(120, label17);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(121, label20);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(125, label6);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist", "mergeInstances", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", false);
            methodVisitor.visitTypeInsn(CHECKCAST, "com/alibaba/nacos/api/naming/pojo/ServiceInfo");
            methodVisitor.visitLabel(label7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(126, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(127, label21);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy mergeInstances failed");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(128, label22);
            methodVisitor.visitVarInsn(ALOAD, 6);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(129, label24);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(131, label23);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/lang/Exception"}, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitInsn(ARETURN);
            Label label25 = new Label();
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label13, label12, 8);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label18, label17, 10);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label21, label25, 10);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label9, label25, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label9, label25, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label9, label25, 2);
            methodVisitor.visitLocalVariable("clusters", "Ljava/lang/String;", null, label9, label25, 3);
            methodVisitor.visitLocalVariable("udpPort", "I", null, label9, label25, 4);
            methodVisitor.visitLocalVariable("healthyOnly", "Z", null, label9, label25, 5);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label10, label25, 6);
            methodVisitor.visitLocalVariable("serviceInfo", "Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, label0, label25, 7);
            methodVisitor.visitLocalVariable("secondaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label15, label25, 8);
            methodVisitor.visitLocalVariable("otherServiceInfo", "Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, label3, label25, 9);
            methodVisitor.visitMaxs(6, 11);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "queryService", "(Ljava/lang/String;Ljava/lang/String;)Lcom/alibaba/nacos/api/naming/pojo/Service;", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(140, label0);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitInsn(ARETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label1, 2);
            methodVisitor.visitMaxs(1, 3);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "createService", "(Lcom/alibaba/nacos/api/naming/pojo/Service;Lcom/alibaba/nacos/api/selector/AbstractSelector;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(146, label0);
            methodVisitor.visitInsn(RETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("service", "Lcom/alibaba/nacos/api/naming/pojo/Service;", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("selector", "Lcom/alibaba/nacos/api/selector/AbstractSelector;", null, label0, label1, 2);
            methodVisitor.visitMaxs(0, 3);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "deleteService", "(Ljava/lang/String;Ljava/lang/String;)Z", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(150, label0);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitInsn(IRETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label1, 2);
            methodVisitor.visitMaxs(1, 3);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "updateService", "(Lcom/alibaba/nacos/api/naming/pojo/Service;Lcom/alibaba/nacos/api/selector/AbstractSelector;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(156, label0);
            methodVisitor.visitInsn(RETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("service", "Lcom/alibaba/nacos/api/naming/pojo/Service;", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("selector", "Lcom/alibaba/nacos/api/selector/AbstractSelector;", null, label0, label1, 2);
            methodVisitor.visitMaxs(0, 3);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "getServiceList", "(IILjava/lang/String;Lcom/alibaba/nacos/api/selector/AbstractSelector;)Lcom/alibaba/nacos/api/naming/pojo/ListView;", "(IILjava/lang/String;Lcom/alibaba/nacos/api/selector/AbstractSelector;)Lcom/alibaba/nacos/api/naming/pojo/ListView<Ljava/lang/String;>;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(161, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ILOAD, 1);
            methodVisitor.visitVarInsn(ILOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "getServiceList", "(IILjava/lang/String;Lcom/alibaba/nacos/api/selector/AbstractSelector;)Lcom/alibaba/nacos/api/naming/pojo/ListView;", true);
            methodVisitor.visitInsn(ARETURN);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label1, 0);
            methodVisitor.visitLocalVariable("pageNo", "I", null, label0, label1, 1);
            methodVisitor.visitLocalVariable("pageSize", "I", null, label0, label1, 2);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label1, 3);
            methodVisitor.visitLocalVariable("selector", "Lcom/alibaba/nacos/api/selector/AbstractSelector;", null, label0, label1, 4);
            methodVisitor.visitMaxs(5, 5);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "subscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/Exception");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(167, label9);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(168, label10);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(170, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "subscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", true);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(174, label1);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(171, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(172, label12);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(173, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy subscribe err.");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(176, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(177, label14);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(179, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "subscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", true);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(183, label4);
            Label label15 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label15);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(180, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 8, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/naming/pojo/ServiceInfo"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(181, label16);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(182, label17);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy subscribe err.");
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(184, label15);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(185, label18);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(188, label6);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingClientProxyAssist", "mergeInstances", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", false);
            methodVisitor.visitTypeInsn(CHECKCAST, "com/alibaba/nacos/api/naming/pojo/ServiceInfo");
            methodVisitor.visitLabel(label7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(189, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(190, label19);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy subscribe mergeInstances failed");
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(191, label20);
            methodVisitor.visitVarInsn(ALOAD, 4);
            Label label21 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label21);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(192, label22);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(194, label21);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/lang/Exception"}, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ARETURN);
            Label label23 = new Label();
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label11, 6);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label16, label15, 8);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label19, label23, 8);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label9, label23, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label9, label23, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label9, label23, 2);
            methodVisitor.visitLocalVariable("clusters", "Ljava/lang/String;", null, label9, label23, 3);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label10, label23, 4);
            methodVisitor.visitLocalVariable("serviceInfo", "Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, label0, label23, 5);
            methodVisitor.visitLocalVariable("secondaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label14, label23, 6);
            methodVisitor.visitLocalVariable("otherServiceInfo", "Lcom/alibaba/nacos/api/naming/pojo/ServiceInfo;", null, label3, label23, 7);
            methodVisitor.visitMaxs(4, 9);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "unsubscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(201, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 4);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(203, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "unsubscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", true);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(207, label1);
            Label label7 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label7);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(204, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 5, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label8 = new Label();
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(205, label8);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitVarInsn(ASTORE, 4);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(206, label9);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy unsubscribe err.");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(209, label7);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(211, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "unsubscribe", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", true);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(215, label4);
            Label label10 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(212, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label11 = new Label();
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(213, label11);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(214, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy unsubscribe err.");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(216, label10);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 4);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label13);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitJumpInsn(IFNULL, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(217, label14);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(219, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(RETURN);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label8, label7, 5);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label11, label10, 6);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label6, label15, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label6, label15, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label6, label15, 2);
            methodVisitor.visitLocalVariable("clusters", "Ljava/lang/String;", null, label6, label15, 3);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label0, label15, 4);
            methodVisitor.visitLocalVariable("secondaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label15, 5);
            methodVisitor.visitMaxs(4, 7);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "isSubscribed", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(223, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "isSubscribed", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z", true);
            Label label1 = new Label();
            methodVisitor.visitJumpInsn(IFNE, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(224, label2);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "isSubscribed", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z", true);
            Label label3 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label3);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ICONST_1);
            Label label4 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label4);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(223, label4);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{Opcodes.INTEGER});
            methodVisitor.visitInsn(IRETURN);
            Label label5 = new Label();
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label5, 0);
            methodVisitor.visitLocalVariable("serviceName", "Ljava/lang/String;", null, label0, label5, 1);
            methodVisitor.visitLocalVariable("groupName", "Ljava/lang/String;", null, label0, label5, 2);
            methodVisitor.visitLocalVariable("clusters", "Ljava/lang/String;", null, label0, label5, 3);
            methodVisitor.visitMaxs(4, 4);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "updateBeatInfo", "(Ljava/util/Set;)V", "(Ljava/util/Set<Lcom/alibaba/nacos/api/naming/pojo/Instance;>;)V", null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "java/lang/Exception");
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(230, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "updateBeatInfo", "(Ljava/util/Set;)V", true);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(233, label1);
            methodVisitor.visitJumpInsn(GOTO, label3);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(231, label2);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 2);
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(232, label6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy updateBeatInfo err.");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(236, label3);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "updateBeatInfo", "(Ljava/util/Set;)V", true);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(239, label4);
            Label label7 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label7);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(237, label5);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 2);
            Label label8 = new Label();
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(238, label8);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy updateBeatInfo err.");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(240, label7);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(RETURN);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLocalVariable("exp", "Ljava/lang/Exception;", null, label6, label3, 2);
            methodVisitor.visitLocalVariable("exp", "Ljava/lang/Exception;", null, label8, label7, 2);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label9, 0);
            methodVisitor.visitLocalVariable("modifiedInstances", "Ljava/util/Set;", "Ljava/util/Set<Lcom/alibaba/nacos/api/naming/pojo/Instance;>;", label0, label9, 1);
            methodVisitor.visitMaxs(3, 3);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "serverHealthy", "()Z", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(244, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "serverHealthy", "()Z", true);
            Label label1 = new Label();
            methodVisitor.visitJumpInsn(IFNE, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "serverHealthy", "()Z", true);
            Label label2 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label2);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ICONST_1);
            Label label3 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label3);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{Opcodes.INTEGER});
            methodVisitor.visitInsn(IRETURN);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label0, label4, 0);
            methodVisitor.visitMaxs(1, 1);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "shutdown", "()V", null, new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "java/lang/Exception");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(249, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 1);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(251, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "primaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "shutdown", "()V", true);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(255, label1);
            Label label7 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label7);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(252, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 2, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 2);
            Label label8 = new Label();
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(253, label8);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ASTORE, 1);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(254, label9);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy primaryClientProxy shutdown err.");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(256, label7);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 2);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(259, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "secondaryClientProxy", "Lcom/alibaba/nacos/client/naming/remote/NamingClientProxy;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "com/alibaba/nacos/client/naming/remote/NamingClientProxy", "shutdown", "()V", true);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(263, label4);
            Label label10 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(260, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 3, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "com/alibaba/nacos/api/exception/NacosException", "java/lang/Object"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 3);
            Label label11 = new Label();
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(261, label11);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ASTORE, 2);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(262, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingClientProxy secondaryClientProxy shutdown err.");
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(264, label10);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 1);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label13);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitJumpInsn(IFNULL, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(265, label14);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(267, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(RETURN);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLocalVariable("exp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label8, label7, 2);
            methodVisitor.visitLocalVariable("exp", "Ljava/lang/Exception;", null, label11, label10, 3);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingClientProxy;", null, label6, label15, 0);
            methodVisitor.visitLocalVariable("primaryExp", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label0, label15, 1);
            methodVisitor.visitLocalVariable("secondaryExp", "Ljava/lang/Object;", null, label3, label15, 2);
            methodVisitor.visitMaxs(3, 4);
            methodVisitor.visitEnd();
        }
        classWriter.visitEnd();

        return classWriter.toByteArray();

    }

}
